#include<iostream>
#include<string.h>
#define MaxSize 500
using namespace std;
typedef char ElementType;
typedef int Position;
typedef struct SNode {
    ElementType Data;
    struct SNode *next; 
}Stack;

void InitStack(Stack *&s);
void DestoryStack(Stack *&s);
bool StackEmpty(Stack *s);
void Push(Stack *&s,ElementType e);
bool Pop(Stack *&s,ElementType &e);
bool GetTop(Stack *s,ElementType &e); 
int main()
{
	Stack* s;
	int i,j,c,l,op[MaxSize];
	char str1[MaxSize],str2[MaxSize],e;
	InitStack(s);
	cin>>str1;l=strlen(str1);
	cin>>str2;
	j=0;c=0;
	for(i=0;i<l;i++){
		if(str1[i]!=str2[j]){
			Push(s,str1[i]);
			op[c]=1;
			c++;
		}
		else {
			j++;
			op[c]=2;
			c++;
		}
		while(GetTop(s,e)==1) 
		if(e==str2[j]){
			Pop(s,e);j++;
			op[c]=3;c++;
		}
		else break;
	}
	while(GetTop(s,e)==1) 
		if(e==str2[j]){
			Pop(s,e);j++;
			op[c]=3;c++;
		}
		else break;
	if(GetTop(s,e)==1)cout<<"Are you kidding me?"<<endl;
	else for(i=0;i<c;i++){
			switch(op[i]){
				case 1:cout<<"1->3"<<endl;break;
				case 2:cout<<"1->2"<<endl;break;
				case 3:cout<<"3->2"<<endl;break;
			}	
		}
}
void InitStack(Stack *&s){
    s=new Stack;
	s->next=NULL;
}
void DestoryStack(Stack *&s){
	Stack *p=s,*q=s->next;
	while(q!=NULL){
		delete p;
		p=q;
		q=p->next;
	}
	delete p;
}
bool StackEmpty(Stack *s){
	return (s->next==NULL);
}
void Push(Stack *&s,ElementType e){ 
    Stack* p;
    p=new Stack;
    p->Data=e;
    p->next=s->next;
	s->next=p; 
}

bool Pop(Stack *&s,ElementType &e){
	Stack *p;
	if(s->next==NULL)return false;
	p=s->next;
	e=p->Data;
	s->next=p->next;
	delete p;
	return true; 
}
bool GetTop(Stack *s,ElementType &e){
	if(s->next==NULL)return false;
	e=s->next->Data;
	return true;
}
